Ext.menu.RangeMenu.prototype.icons = {
	  gt: '../resources/extendIamges/greater_then.png', 
	  lt: '../resources/extendIamges/less_then.png',
	  eq: '../resources/extendIamges/equals.png'
};
Ext.grid.filter.StringFilter.prototype.icon = '../resources/extendIamges/find.png';

/* 
 * 修改filter发送到后台的数据模式.
 * 例:filter.[i][field]、filter.[i][type]、filter.[i][value]、filter.[i][comparison]、
 * 
 */

Ext.grid.GridFilters.prototype.buildQuery=function(filters){
	var p = {};
		for(var i=0, len=filters.length; i<len; i++) {
			var f = filters[i];
			var root = [this.paramPrefix, '[', i, ']'].join('');
			p[root + '[field]'] = f.field;
			//修改此处
			var dataPrefix = root;
			for(var key in f.data) {
				p[[dataPrefix, '[', key, ']'].join('')] = f.data[key];
      }
		}
		
	return p;
}

//添加时间交验函数
Ext.apply(Ext.form.VTypes, {    
  	//时间交验属性
	daterange: function(val, field) {
	    var date = field.parseDate(val);
		
	    var dispUpd = function(picker) {
	      var ad = picker.activeDate;
	      picker.activeDate = null;
	      picker.update(ad);
	    };

		//debugger;
	    if (field.startDateField) {
	      var sd = field.startDateField;
	      sd.maxValue = date;
	      if (sd.menu && sd.menu.picker) {
	        sd.menu.picker.maxDate = date;
	        dispUpd(sd.menu.picker);
	      }
	    } else if (field.endDateField) {
	      var ed = field.endDateField;
	      ed.minValue = date;
	      if (ed.menu && ed.menu.picker) {
	        ed.menu.picker.minDate = date;
	        dispUpd(ed.menu.picker);
	      }
	    }

	    return true;
  }
});